package com.kh.first.service;

import com.kh.first.dao.KHDeviceDao;
import com.kh.first.pojo.KHDevicePojo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class KHDeviceService {

    @Autowired
    private KHDeviceDao khdeviceDao;

    public Long saveKHDevice(KHDevicePojo pojo){
        return khdeviceDao.saveKHDevice(pojo);
    }

    public Long saveKHDeviceList(List<KHDevicePojo> list){
        return khdeviceDao.saveKHDeviceList(list);
    }

    public Long deleteKHDeviceById(Long id){
        return khdeviceDao.deleteKHDeviceById(id);
    }

    public Long updateKHDeviceById(KHDevicePojo pojo){
        return khdeviceDao.updateKHDeviceById(pojo);
    }

    public List<KHDevicePojo> getKHDeviceList(KHDevicePojo pojo){
        return khdeviceDao.getKHDeviceList(pojo);
    }
    public Long countKHDeviceList(KHDevicePojo pojo){
        return khdeviceDao.countKHDeviceList(pojo);
    }
}
